// components/Team/teamMateItem/teamMateItem.js

import api from '../../../api/index'
const db = wx.cloud.database()
const _ = db.command
const $ = db.command.aggregate
const app = getApp()


Component({
  /**
   * 组件的属性列表
   */
  properties: {
    item:Object,
    type: String
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  attached() {
    var openid = this.data.item.openid
    var params= {openid}
    // console.log(openid)
    api.userInfo.getSkill(params).then(res=>{
    //  console.log(res);
      this.setData({
        ['item.skill']:res
      })
    })
    var createTime = app.formatDate(this.data.item.createTime)
    this.setData({
      ["item.createTime"] : createTime
    })
  },
  methods: {
    
  }
})
